package cc.lishixi.app001;


import org.apache.pivot.collections.Map;
import org.apache.pivot.wtk.*;

public class MyFileBrowser2 implements Application {

    public static void main(String[] args) {
        DesktopApplicationContext.main(MyFileBrowser2.class, args);
    }

    @Override
    public void startup(final Display display, Map<String, String> properties) {
        final Frame window = new Frame();
        PushButton test = new PushButton("TEST");
        window.setContent(test);
        test.getButtonPressListeners().add(new ButtonPressListener() {
            @Override
            public void buttonPressed(Button button) {

                Frame components = new Frame();
                components.setSize(500, 2000);
                components.setMaximized(true);
                components.open(window.getRootOwner());

            }
        });
        window.setMaximized(true);
        window.open(display);
    }

    @Override
    public boolean shutdown(boolean optional) {
        return false;
    }

    @Override
    public void suspend() {

    }

    @Override
    public void resume() {

    }
}
